<div class="form">
    <form name="{%$form.formcode%}" id="{%$form.formcode%}" method="post" action="{%$form.action%}"  onSubmit="return {%$form.formcode%}form('{%$form.isseccode%}')">
        <input type="hidden" name="linkurl" value="add">
        <input type="hidden" name="fgid" id="fgid" value="{%$form.fgid%}">
        <input type="hidden" name="formcode" id="formcode" value="{%$form.formcode%}">
        {%forlist from=$array key=i%}
            {%if $array[i].isline==1%}
                {%$array[i].typename%} 
            {%else%}

            {%if $array[i].isvalidate==1%}*{%/if%}<span style="float: left;width: 120px;text-align: right;">{%$array[i].typename%}:</span>


            {%if $array[i].inputtype=='string'%}
                <input type="text" name="{%$array[i].attrname%}" size="{%$array[i].attrsize%}" maxlength="{%$array[i].attrlenther%}" value="{%$array[i].attrvalue%}" class="input1"/>
                <br />
            {%/if%}
            {%if $array[i].inputtype=='int'%}
                <input type="text" name="{%$array[i].attrname%}]" size="{%$array[i].attrsize%}" maxlength="{%$array[i].attrlenther%}" value="{%$array[i].attrvalue%}" class="input1"/>
                <br />
            {%/if%}
            {%if $array[i].inputtype=='datetime'%}
                <input type="text" name="{%$array[i].attrname%}" size="{%$array[i].attrsize%}" id="{%$array[i].attrname%}" onClick="WdatePicker({el:'{%$array[i].attrname%}',readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" maxlength="{%$array[i].attrlenther%}" class="input1"/>
                <br />
            {%/if%}
            {%if $array[i].inputtype=='selectinput'%}
                <input type="text" name="{%$array[i].attrname%}" size="{%$array[i].attrsize%}" id="{%$array[i].attrname%}" value="" maxlength="{%$array[i].attrlenther%}" class="input1"/>
                <br />
                <select size="1" name="{%$array[i].attrname%}selectinputvalue" onChange="javascript:$('#{%$array[i].attrname%}').val(this.value)">
                    <option value="">{%$array[i].typename%}</option>
                    {%forlist from=$array[i].selectinputvalue key=ii%}
                    <option value="{%$array[i].selectinputvalue[ii].name%}">{%$array[i].selectinputvalue[ii].name%}</option>
                    {%/forlist%}
                </select>
                <br />
            {%/if%}
            {%if $array[i].inputtype=='img'%}
                <input type="text" name="{%$array[i].attrname%}" size="{%$array[i].attrsize%}" value="{%$array[i].attrvalue%}" class="input1"/><br />
            {%/if%}
            {%if $array[i].inputtype=='addon'%}
                <input type="text" name="{%$array[i].attrname%}" size="{%$array[i].attrsize%}" value="{%$array[i].attrvalue%}" class="input1"/><br />
            {%/if%}
            {%if $array[i].inputtype=='htmltext'%}
                <textarea name="{%$array[i].attrname%}" cols="{%$array[i].attrsize%}" rows="{%$array[i].attrrow%}" class="input1">{%$array[i].attrvalue%}</textarea>
                <br />
            {%/if%}
            {%if $array[i].inputtype=='editor'%}
                <textarea name="{%$array[i].attrname%}" cols="{%$array[i].attrsize%}" rows="{%$array[i].attrrow%}" class="input1">{%$array[i].attrvalue%}</textarea><br />
            {%/if%}
            {%if $array[i].inputtype=='text'%}
                <textarea name="{%$array[i].attrname%}" cols="{%$array[i].attrsize%}" rows="{%$array[i].attrrow%}" class="input1">{%$array[i].attrvalue%}</textarea><br />
            {%/if%}
            {%if $array[i].inputtype=='select'%}
            <select size="1" name="{%$array[i].attrname%}">
                {%forlist from=$array[i].attrvalue key=ii%}
                <option {%if $array[i].attrvalue[ii].selected=='selected'%}selected="selected" {%/if%}value="{%$array[i].attrvalue[ii].name%}">{%$array[i].attrvalue[ii].name%}</option>
                {%/forlist%}
            </select><br />
            {%/if%}
            {%if $array[i].inputtype=='radio'%}
                {%forlist from=$array[i].attrvalue key=ii%}
                    <input {%if $array[i].attrvalue[ii].selected=='selected'%}checked="checked" {%/if%}name="{%$array[i].attrname%}" type="radio" value="{%$array[i].attrvalue[ii].name%}" /> {%$array[i].attrvalue[ii].name%}
                {%/forlist%}
                <br />
            {%/if%}
            {%if $array[i].inputtype=='checkbox'%}
                {%forlist from=$array[i].attrvalue key=ii%}
                    <input {%if $array[i].attrvalue[ii].selected=='selected'%}checked="checked" {%/if%}name="{%$array[i].attrname%}[]" type="checkbox" value="{%$array[i].attrvalue[ii].name%}" /> {%$array[i].attrvalue[ii].name%}
                {%/forlist%}
                <br />
            {%/if%}
            {%if $array[i].typeremark!=''%}
            {%/if%}
            {%/if%}
        {%/forlist%}
        {%if $form.isseccode==1%}
            <span>Type the code shown</span><input type="text" id="code" name="seccode" class="input1" maxlength="4" size="3" style="text-transform: uppercase;"/><img title="Try a new code" id="{%$form.formcode%}seccodesrc" onClick="sessionimg('{%$form.formcode%}seccodesrc','{%$rootdir%}')" src="{%$seccodelink%}" style="cursor: pointer;" align="absmiddle"/>
        {%/if%}
        <input type="submit" name="submit" id="{%$form.formcode%}botton" value="提交" />
        <input type="reset" name="reset" value="重置"  />
    </form>
</div>
